<?php
/*
 * 
 */
class Status extends AppModel {
  
	var $name = 'Status';
	
  var $defaultId = 1;  // corresponds to "Prepared". This will be used upon first submitting a new JobVersion.
  
  
  var $validate = array(
		'name' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          //'message' => 'Your custom message here',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'maxlength' => array(
            'rule' => array('maxlength', 40),
            'message' => 'Maximum length of this field is 40.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'isUnique' => array(
            'rule' => 'isUnique',        
            'message' => 'This value has already been taken. Please choose something unique.'
        )
    )
	);
	

  //The Associations below have been created with all possible keys, those that are not needed can be removed

	var $hasMany = array(
		'JobVersion' => array(
			'className' => 'JobVersion',
			'foreignKey' => 'status_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
